#include "DetourNavMesh.h"
#ifdef __cplusplus
extern "C" {
#endif
void nav_dtBVNode_Delete(dtBVNode * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtBVNode_DeleteArray(dtBVNode * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtBVNode * nav_NewdtBVNode(){
	dtBVNode* wrap_out = new dtBVNode();
	return wrap_out;
}

unsigned short(*nav_dtBVNode_GetPtrToBmax(dtBVNode * c_this))[3]{
	return (unsigned short(*)[3])(&(c_this->bmax));
}

unsigned short(*nav_dtBVNode_GetPtrToBmin(dtBVNode * c_this))[3]{
	return (unsigned short(*)[3])(&(c_this->bmin));
}

int * nav_dtBVNode_GetPtrToI(dtBVNode * c_this){
	return (int *)(&(c_this->i));
}

dtBVNode * nav_dtBVNode_IndexArray(dtBVNode * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

void nav_dtLink_Delete(dtLink * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtLink_DeleteArray(dtLink * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtLink * nav_NewdtLink(){
	dtLink* wrap_out = new dtLink();
	return wrap_out;
}

unsigned char * nav_dtLink_GetPtrToBmax(dtLink * c_this){
	return (unsigned char *)(&(c_this->bmax));
}

unsigned char * nav_dtLink_GetPtrToBmin(dtLink * c_this){
	return (unsigned char *)(&(c_this->bmin));
}

unsigned char * nav_dtLink_GetPtrToEdge(dtLink * c_this){
	return (unsigned char *)(&(c_this->edge));
}

unsigned int * nav_dtLink_GetPtrToNext(dtLink * c_this){
	return (unsigned int *)(&(c_this->next));
}

dtPolyRef * nav_dtLink_GetPtrToRef(dtLink * c_this){
	return (dtPolyRef *)(&(c_this->ref));
}

unsigned char * nav_dtLink_GetPtrToSide(dtLink * c_this){
	return (unsigned char *)(&(c_this->side));
}

dtLink * nav_dtLink_IndexArray(dtLink * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

void nav_dtMeshHeader_Delete(dtMeshHeader * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtMeshHeader_DeleteArray(dtMeshHeader * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtMeshHeader * nav_NewdtMeshHeader(){
	dtMeshHeader* wrap_out = new dtMeshHeader();
	return wrap_out;
}

float(*nav_dtMeshHeader_GetPtrToBmax(dtMeshHeader * c_this))[3]{
	return (float(*)[3])(&(c_this->bmax));
}

float(*nav_dtMeshHeader_GetPtrToBmin(dtMeshHeader * c_this))[3]{
	return (float(*)[3])(&(c_this->bmin));
}

int * nav_dtMeshHeader_GetPtrToBvNodeCount(dtMeshHeader * c_this){
	return (int *)(&(c_this->bvNodeCount));
}

float * nav_dtMeshHeader_GetPtrToBvQuantFactor(dtMeshHeader * c_this){
	return (float *)(&(c_this->bvQuantFactor));
}

int * nav_dtMeshHeader_GetPtrToDetailMeshCount(dtMeshHeader * c_this){
	return (int *)(&(c_this->detailMeshCount));
}

int * nav_dtMeshHeader_GetPtrToDetailTriCount(dtMeshHeader * c_this){
	return (int *)(&(c_this->detailTriCount));
}

int * nav_dtMeshHeader_GetPtrToDetailVertCount(dtMeshHeader * c_this){
	return (int *)(&(c_this->detailVertCount));
}

int * nav_dtMeshHeader_GetPtrToLayer(dtMeshHeader * c_this){
	return (int *)(&(c_this->layer));
}

int * nav_dtMeshHeader_GetPtrToMagic(dtMeshHeader * c_this){
	return (int *)(&(c_this->magic));
}

int * nav_dtMeshHeader_GetPtrToMaxLinkCount(dtMeshHeader * c_this){
	return (int *)(&(c_this->maxLinkCount));
}

int * nav_dtMeshHeader_GetPtrToOffMeshBase(dtMeshHeader * c_this){
	return (int *)(&(c_this->offMeshBase));
}

int * nav_dtMeshHeader_GetPtrToOffMeshConCount(dtMeshHeader * c_this){
	return (int *)(&(c_this->offMeshConCount));
}

int * nav_dtMeshHeader_GetPtrToPolyCount(dtMeshHeader * c_this){
	return (int *)(&(c_this->polyCount));
}

unsigned int * nav_dtMeshHeader_GetPtrToUserId(dtMeshHeader * c_this){
	return (unsigned int *)(&(c_this->userId));
}

int * nav_dtMeshHeader_GetPtrToVersion(dtMeshHeader * c_this){
	return (int *)(&(c_this->version));
}

int * nav_dtMeshHeader_GetPtrToVertCount(dtMeshHeader * c_this){
	return (int *)(&(c_this->vertCount));
}

float * nav_dtMeshHeader_GetPtrToWalkableClimb(dtMeshHeader * c_this){
	return (float *)(&(c_this->walkableClimb));
}

float * nav_dtMeshHeader_GetPtrToWalkableHeight(dtMeshHeader * c_this){
	return (float *)(&(c_this->walkableHeight));
}

float * nav_dtMeshHeader_GetPtrToWalkableRadius(dtMeshHeader * c_this){
	return (float *)(&(c_this->walkableRadius));
}

int * nav_dtMeshHeader_GetPtrToX(dtMeshHeader * c_this){
	return (int *)(&(c_this->x));
}

int * nav_dtMeshHeader_GetPtrToY(dtMeshHeader * c_this){
	return (int *)(&(c_this->y));
}

dtMeshHeader * nav_dtMeshHeader_IndexArray(dtMeshHeader * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

void nav_dtMeshTile_Delete(dtMeshTile * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtMeshTile_DeleteArray(dtMeshTile * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtBVNode * * nav_dtMeshTile_GetPtrToBvTree(dtMeshTile * c_this){
	return (dtBVNode * *)(&(c_this->bvTree));
}

unsigned char * * nav_dtMeshTile_GetPtrToData(dtMeshTile * c_this){
	return (unsigned char * *)(&(c_this->data));
}

int * nav_dtMeshTile_GetPtrToDataSize(dtMeshTile * c_this){
	return (int *)(&(c_this->dataSize));
}

dtPolyDetail * * nav_dtMeshTile_GetPtrToDetailMeshes(dtMeshTile * c_this){
	return (dtPolyDetail * *)(&(c_this->detailMeshes));
}

unsigned char * * nav_dtMeshTile_GetPtrToDetailTris(dtMeshTile * c_this){
	return (unsigned char * *)(&(c_this->detailTris));
}

float * * nav_dtMeshTile_GetPtrToDetailVerts(dtMeshTile * c_this){
	return (float * *)(&(c_this->detailVerts));
}

int * nav_dtMeshTile_GetPtrToFlags(dtMeshTile * c_this){
	return (int *)(&(c_this->flags));
}

dtMeshHeader * * nav_dtMeshTile_GetPtrToHeader(dtMeshTile * c_this){
	return (dtMeshHeader * *)(&(c_this->header));
}

dtLink * * nav_dtMeshTile_GetPtrToLinks(dtMeshTile * c_this){
	return (dtLink * *)(&(c_this->links));
}

unsigned int * nav_dtMeshTile_GetPtrToLinksFreeList(dtMeshTile * c_this){
	return (unsigned int *)(&(c_this->linksFreeList));
}

dtMeshTile * * nav_dtMeshTile_GetPtrToNext(dtMeshTile * c_this){
	return (dtMeshTile * *)(&(c_this->next));
}

dtOffMeshConnection * * nav_dtMeshTile_GetPtrToOffMeshCons(dtMeshTile * c_this){
	return (dtOffMeshConnection * *)(&(c_this->offMeshCons));
}

dtPoly * * nav_dtMeshTile_GetPtrToPolys(dtMeshTile * c_this){
	return (dtPoly * *)(&(c_this->polys));
}

unsigned int * nav_dtMeshTile_GetPtrToSalt(dtMeshTile * c_this){
	return (unsigned int *)(&(c_this->salt));
}

float * * nav_dtMeshTile_GetPtrToVerts(dtMeshTile * c_this){
	return (float * *)(&(c_this->verts));
}

dtMeshTile * nav_dtMeshTile_IndexArray(dtMeshTile * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

dtStatus nav_dtNavMesh_addTile(dtNavMesh * c_this,unsigned char * data,int dataSize,int flags,dtTileRef lastRef,dtTileRef * result){
	unsigned char * c_arg_data=(unsigned char *)(void*)(data);
	int c_arg_dataSize=dataSize;
	int c_arg_flags=flags;
	dtTileRef c_arg_lastRef=lastRef;
	dtTileRef * c_arg_result=(dtTileRef *)(void*)(result);
	dtStatus c_out = c_this->addTile(c_arg_data,c_arg_dataSize,c_arg_flags,c_arg_lastRef,c_arg_result);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

void nav_dtNavMesh_calcTileLoc(dtNavMesh const * c_this,float const * pos,int * tx,int * ty){
	float const * c_arg_pos=(float const *)(void*)(pos);
	int * c_arg_tx=(int *)(void*)(tx);
	int * c_arg_ty=(int *)(void*)(ty);
	c_this->calcTileLoc(c_arg_pos,c_arg_tx,c_arg_ty);
}

void nav_dtNavMesh_decodePolyId(dtNavMesh const * c_this,dtPolyRef ref,unsigned int * salt,unsigned int * it,unsigned int * ip){
	dtPolyRef c_arg_ref=ref;
	unsigned int& c_arg_salt=*(unsigned int *)(salt);
	unsigned int& c_arg_it=*(unsigned int *)(it);
	unsigned int& c_arg_ip=*(unsigned int *)(ip);
	c_this->decodePolyId(c_arg_ref,c_arg_salt,c_arg_it,c_arg_ip);
}

unsigned int nav_dtNavMesh_decodePolyIdPoly(dtNavMesh const * c_this,dtPolyRef ref){
	dtPolyRef c_arg_ref=ref;
	unsigned int c_out = c_this->decodePolyIdPoly(c_arg_ref);
	unsigned int wrap_out  = (c_out);
	return wrap_out;
}

unsigned int nav_dtNavMesh_decodePolyIdSalt(dtNavMesh const * c_this,dtPolyRef ref){
	dtPolyRef c_arg_ref=ref;
	unsigned int c_out = c_this->decodePolyIdSalt(c_arg_ref);
	unsigned int wrap_out  = (c_out);
	return wrap_out;
}

unsigned int nav_dtNavMesh_decodePolyIdTile(dtNavMesh const * c_this,dtPolyRef ref){
	dtPolyRef c_arg_ref=ref;
	unsigned int c_out = c_this->decodePolyIdTile(c_arg_ref);
	unsigned int wrap_out  = (c_out);
	return wrap_out;
}

void nav_dtNavMesh_Delete(dtNavMesh * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtNavMesh_DeleteArray(dtNavMesh * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtNavMesh * nav_NewdtNavMesh(){
	dtNavMesh* wrap_out = new dtNavMesh();
	return wrap_out;
}

dtPolyRef nav_dtNavMesh_encodePolyId(dtNavMesh const * c_this,unsigned int salt,unsigned int it,unsigned int ip){
	unsigned int c_arg_salt=salt;
	unsigned int c_arg_it=it;
	unsigned int c_arg_ip=ip;
	dtPolyRef c_out = c_this->encodePolyId(c_arg_salt,c_arg_it,c_arg_ip);
	dtPolyRef wrap_out  = (c_out);
	return wrap_out;
}

int nav_dtNavMesh_getMaxTiles(dtNavMesh const * c_this){
	int c_out = c_this->getMaxTiles();
	int wrap_out  = (c_out);
	return wrap_out;
}

dtOffMeshConnection const * nav_dtNavMesh_getOffMeshConnectionByRef(dtNavMesh const * c_this,dtPolyRef ref){
	dtPolyRef c_arg_ref=ref;
	dtOffMeshConnection const * c_out = c_this->getOffMeshConnectionByRef(c_arg_ref);
	dtOffMeshConnection const * wrap_out  = (dtOffMeshConnection const *)(void*)(c_out);
	return wrap_out;
}

dtStatus nav_dtNavMesh_getOffMeshConnectionPolyEndPoints(dtNavMesh const * c_this,dtPolyRef prevRef,dtPolyRef polyRef,float * startPos,float * endPos){
	dtPolyRef c_arg_prevRef=prevRef;
	dtPolyRef c_arg_polyRef=polyRef;
	float * c_arg_startPos=(float *)(void*)(startPos);
	float * c_arg_endPos=(float *)(void*)(endPos);
	dtStatus c_out = c_this->getOffMeshConnectionPolyEndPoints(c_arg_prevRef,c_arg_polyRef,c_arg_startPos,c_arg_endPos);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

dtNavMeshParams const * nav_dtNavMesh_getParams(dtNavMesh const * c_this){
	dtNavMeshParams const * c_out = c_this->getParams();
	dtNavMeshParams const * wrap_out  = (dtNavMeshParams const *)(void*)(c_out);
	return wrap_out;
}

dtStatus nav_dtNavMesh_getPolyArea(dtNavMesh const * c_this,dtPolyRef ref,unsigned char * resultArea){
	dtPolyRef c_arg_ref=ref;
	unsigned char * c_arg_resultArea=(unsigned char *)(void*)(resultArea);
	dtStatus c_out = c_this->getPolyArea(c_arg_ref,c_arg_resultArea);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

dtStatus nav_dtNavMesh_getPolyFlags(dtNavMesh const * c_this,dtPolyRef ref,unsigned short * resultFlags){
	dtPolyRef c_arg_ref=ref;
	unsigned short * c_arg_resultFlags=(unsigned short *)(void*)(resultFlags);
	dtStatus c_out = c_this->getPolyFlags(c_arg_ref,c_arg_resultFlags);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

dtPolyRef nav_dtNavMesh_getPolyRefBase(dtNavMesh const * c_this,dtMeshTile const * tile){
	dtMeshTile const * c_arg_tile=(dtMeshTile const *)(void*)(tile);
	dtPolyRef c_out = c_this->getPolyRefBase(c_arg_tile);
	dtPolyRef wrap_out  = (c_out);
	return wrap_out;
}

dtMeshTile const * nav_dtNavMesh_getTile(dtNavMesh const * c_this,int i){
	int c_arg_i=i;
	dtMeshTile const * c_out = c_this->getTile(c_arg_i);
	dtMeshTile const * wrap_out  = (dtMeshTile const *)(void*)(c_out);
	return wrap_out;
}

dtStatus nav_dtNavMesh_getTileAndPolyByRef(dtNavMesh const * c_this,dtPolyRef const ref,dtMeshTile const * * tile,dtPoly const * * poly){
	dtPolyRef const c_arg_ref=ref;
	dtMeshTile const * * c_arg_tile=(dtMeshTile const * *)(void*)(tile);
	dtPoly const * * c_arg_poly=(dtPoly const * *)(void*)(poly);
	dtStatus c_out = c_this->getTileAndPolyByRef(c_arg_ref,c_arg_tile,c_arg_poly);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

void nav_dtNavMesh_getTileAndPolyByRefUnsafe(dtNavMesh const * c_this,dtPolyRef const ref,dtMeshTile const * * tile,dtPoly const * * poly){
	dtPolyRef const c_arg_ref=ref;
	dtMeshTile const * * c_arg_tile=(dtMeshTile const * *)(void*)(tile);
	dtPoly const * * c_arg_poly=(dtPoly const * *)(void*)(poly);
	c_this->getTileAndPolyByRefUnsafe(c_arg_ref,c_arg_tile,c_arg_poly);
}

dtMeshTile const * nav_dtNavMesh_getTileAt(dtNavMesh const * c_this,int const x,int const y,int const layer){
	int const c_arg_x=x;
	int const c_arg_y=y;
	int const c_arg_layer=layer;
	dtMeshTile const * c_out = c_this->getTileAt(c_arg_x,c_arg_y,c_arg_layer);
	dtMeshTile const * wrap_out  = (dtMeshTile const *)(void*)(c_out);
	return wrap_out;
}

dtMeshTile const * nav_dtNavMesh_getTileByRef(dtNavMesh const * c_this,dtTileRef ref){
	dtTileRef c_arg_ref=ref;
	dtMeshTile const * c_out = c_this->getTileByRef(c_arg_ref);
	dtMeshTile const * wrap_out  = (dtMeshTile const *)(void*)(c_out);
	return wrap_out;
}

dtTileRef nav_dtNavMesh_getTileRef(dtNavMesh const * c_this,dtMeshTile const * tile){
	dtMeshTile const * c_arg_tile=(dtMeshTile const *)(void*)(tile);
	dtTileRef c_out = c_this->getTileRef(c_arg_tile);
	dtTileRef wrap_out  = (c_out);
	return wrap_out;
}

dtTileRef nav_dtNavMesh_getTileRefAt(dtNavMesh const * c_this,int x,int y,int layer){
	int c_arg_x=x;
	int c_arg_y=y;
	int c_arg_layer=layer;
	dtTileRef c_out = c_this->getTileRefAt(c_arg_x,c_arg_y,c_arg_layer);
	dtTileRef wrap_out  = (c_out);
	return wrap_out;
}

int nav_dtNavMesh_getTilesAt(dtNavMesh const * c_this,int const x,int const y,dtMeshTile const * * tiles,int const maxTiles){
	int const c_arg_x=x;
	int const c_arg_y=y;
	dtMeshTile const * * c_arg_tiles=(dtMeshTile const * *)(void*)(tiles);
	int const c_arg_maxTiles=maxTiles;
	int c_out = c_this->getTilesAt(c_arg_x,c_arg_y,c_arg_tiles,c_arg_maxTiles);
	int wrap_out  = (c_out);
	return wrap_out;
}

int nav_dtNavMesh_getTileStateSize(dtNavMesh const * c_this,dtMeshTile const * tile){
	dtMeshTile const * c_arg_tile=(dtMeshTile const *)(void*)(tile);
	int c_out = c_this->getTileStateSize(c_arg_tile);
	int wrap_out  = (c_out);
	return wrap_out;
}

dtNavMesh * nav_dtNavMesh_IndexArray(dtNavMesh * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

dtStatus nav_dtNavMesh_init(dtNavMesh * c_this,dtNavMeshParams const * params){
	dtNavMeshParams const * c_arg_params=(dtNavMeshParams const *)(void*)(params);
	dtStatus c_out = c_this->init(c_arg_params);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

dtStatus nav_dtNavMesh_init11(dtNavMesh * c_this,unsigned char * data,int const dataSize,int const flags){
	unsigned char * c_arg_data=(unsigned char *)(void*)(data);
	int const c_arg_dataSize=dataSize;
	int const c_arg_flags=flags;
	dtStatus c_out = c_this->init(c_arg_data,c_arg_dataSize,c_arg_flags);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

bool nav_dtNavMesh_isValidPolyRef(dtNavMesh const * c_this,dtPolyRef ref){
	dtPolyRef c_arg_ref=ref;
	bool c_out = c_this->isValidPolyRef(c_arg_ref);
	bool wrap_out  = (c_out);
	return wrap_out;
}

dtStatus nav_dtNavMesh_removeTile(dtNavMesh * c_this,dtTileRef ref,unsigned char * * data,int * dataSize){
	dtTileRef c_arg_ref=ref;
	unsigned char * * c_arg_data=(unsigned char * *)(void*)(data);
	int * c_arg_dataSize=(int *)(void*)(dataSize);
	dtStatus c_out = c_this->removeTile(c_arg_ref,c_arg_data,c_arg_dataSize);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

dtStatus nav_dtNavMesh_restoreTileState(dtNavMesh * c_this,dtMeshTile * tile,unsigned char const * data,int const maxDataSize){
	dtMeshTile * c_arg_tile=(dtMeshTile *)(void*)(tile);
	unsigned char const * c_arg_data=(unsigned char const *)(void*)(data);
	int const c_arg_maxDataSize=maxDataSize;
	dtStatus c_out = c_this->restoreTileState(c_arg_tile,c_arg_data,c_arg_maxDataSize);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

dtStatus nav_dtNavMesh_setPolyArea(dtNavMesh * c_this,dtPolyRef ref,unsigned char area){
	dtPolyRef c_arg_ref=ref;
	unsigned char c_arg_area=area;
	dtStatus c_out = c_this->setPolyArea(c_arg_ref,c_arg_area);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

dtStatus nav_dtNavMesh_setPolyFlags(dtNavMesh * c_this,dtPolyRef ref,unsigned short flags){
	dtPolyRef c_arg_ref=ref;
	unsigned short c_arg_flags=flags;
	dtStatus c_out = c_this->setPolyFlags(c_arg_ref,c_arg_flags);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

dtStatus nav_dtNavMesh_storeTileState(dtNavMesh const * c_this,dtMeshTile const * tile,unsigned char * data,int const maxDataSize){
	dtMeshTile const * c_arg_tile=(dtMeshTile const *)(void*)(tile);
	unsigned char * c_arg_data=(unsigned char *)(void*)(data);
	int const c_arg_maxDataSize=maxDataSize;
	dtStatus c_out = c_this->storeTileState(c_arg_tile,c_arg_data,c_arg_maxDataSize);
	dtStatus wrap_out  = (c_out);
	return wrap_out;
}

void nav_dtNavMeshParams_Delete(dtNavMeshParams * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtNavMeshParams_DeleteArray(dtNavMeshParams * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtNavMeshParams * nav_NewdtNavMeshParams(){
	dtNavMeshParams* wrap_out = new dtNavMeshParams();
	return wrap_out;
}

int * nav_dtNavMeshParams_GetPtrToMaxPolys(dtNavMeshParams * c_this){
	return (int *)(&(c_this->maxPolys));
}

int * nav_dtNavMeshParams_GetPtrToMaxTiles(dtNavMeshParams * c_this){
	return (int *)(&(c_this->maxTiles));
}

float(*nav_dtNavMeshParams_GetPtrToOrig(dtNavMeshParams * c_this))[3]{
	return (float(*)[3])(&(c_this->orig));
}

float * nav_dtNavMeshParams_GetPtrToTileHeight(dtNavMeshParams * c_this){
	return (float *)(&(c_this->tileHeight));
}

float * nav_dtNavMeshParams_GetPtrToTileWidth(dtNavMeshParams * c_this){
	return (float *)(&(c_this->tileWidth));
}

dtNavMeshParams * nav_dtNavMeshParams_IndexArray(dtNavMeshParams * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

void nav_dtOffMeshConnection_Delete(dtOffMeshConnection * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtOffMeshConnection_DeleteArray(dtOffMeshConnection * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtOffMeshConnection * nav_NewdtOffMeshConnection(){
	dtOffMeshConnection* wrap_out = new dtOffMeshConnection();
	return wrap_out;
}

unsigned char * nav_dtOffMeshConnection_GetPtrToFlags(dtOffMeshConnection * c_this){
	return (unsigned char *)(&(c_this->flags));
}

unsigned short * nav_dtOffMeshConnection_GetPtrToPoly(dtOffMeshConnection * c_this){
	return (unsigned short *)(&(c_this->poly));
}

float(*nav_dtOffMeshConnection_GetPtrToPos(dtOffMeshConnection * c_this))[6]{
	return (float(*)[6])(&(c_this->pos));
}

float * nav_dtOffMeshConnection_GetPtrToRad(dtOffMeshConnection * c_this){
	return (float *)(&(c_this->rad));
}

unsigned char * nav_dtOffMeshConnection_GetPtrToSide(dtOffMeshConnection * c_this){
	return (unsigned char *)(&(c_this->side));
}

unsigned int * nav_dtOffMeshConnection_GetPtrToUserId(dtOffMeshConnection * c_this){
	return (unsigned int *)(&(c_this->userId));
}

dtOffMeshConnection * nav_dtOffMeshConnection_IndexArray(dtOffMeshConnection * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

void nav_dtPoly_Delete(dtPoly * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtPoly_DeleteArray(dtPoly * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtPoly * nav_NewdtPoly(){
	dtPoly* wrap_out = new dtPoly();
	return wrap_out;
}

unsigned char nav_dtPoly_getArea(dtPoly const * c_this){
	unsigned char c_out = c_this->getArea();
	unsigned char wrap_out  = (c_out);
	return wrap_out;
}

unsigned char * nav_dtPoly_GetPtrToAreaAndtype(dtPoly * c_this){
	return (unsigned char *)(&(c_this->areaAndtype));
}

unsigned int * nav_dtPoly_GetPtrToFirstLink(dtPoly * c_this){
	return (unsigned int *)(&(c_this->firstLink));
}

unsigned short * nav_dtPoly_GetPtrToFlags(dtPoly * c_this){
	return (unsigned short *)(&(c_this->flags));
}

unsigned short(*nav_dtPoly_GetPtrToNeis(dtPoly * c_this))[6]{
	return (unsigned short(*)[6])(&(c_this->neis));
}

unsigned char * nav_dtPoly_GetPtrToVertCount(dtPoly * c_this){
	return (unsigned char *)(&(c_this->vertCount));
}

unsigned short(*nav_dtPoly_GetPtrToVerts(dtPoly * c_this))[6]{
	return (unsigned short(*)[6])(&(c_this->verts));
}

unsigned char nav_dtPoly_getType(dtPoly const * c_this){
	unsigned char c_out = c_this->getType();
	unsigned char wrap_out  = (c_out);
	return wrap_out;
}

dtPoly * nav_dtPoly_IndexArray(dtPoly * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

void nav_dtPoly_setArea(dtPoly * c_this,unsigned char a){
	unsigned char c_arg_a=a;
	c_this->setArea(c_arg_a);
}

void nav_dtPoly_setType(dtPoly * c_this,unsigned char t){
	unsigned char c_arg_t=t;
	c_this->setType(c_arg_t);
}

void nav_dtPolyDetail_Delete(dtPolyDetail * c_this){
	if(c_this==0){
	    return;
	}
	delete c_this;
}

void nav_dtPolyDetail_DeleteArray(dtPolyDetail * c_this){
	if(c_this==0){
		return;
	}
	delete []c_this;
}

dtPolyDetail * nav_NewdtPolyDetail(){
	dtPolyDetail* wrap_out = new dtPolyDetail();
	return wrap_out;
}

unsigned int * nav_dtPolyDetail_GetPtrToTriBase(dtPolyDetail * c_this){
	return (unsigned int *)(&(c_this->triBase));
}

unsigned char * nav_dtPolyDetail_GetPtrToTriCount(dtPolyDetail * c_this){
	return (unsigned char *)(&(c_this->triCount));
}

unsigned int * nav_dtPolyDetail_GetPtrToVertBase(dtPolyDetail * c_this){
	return (unsigned int *)(&(c_this->vertBase));
}

unsigned char * nav_dtPolyDetail_GetPtrToVertCount(dtPolyDetail * c_this){
	return (unsigned char *)(&(c_this->vertCount));
}

dtPolyDetail * nav_dtPolyDetail_IndexArray(dtPolyDetail * c_this,long n){
	if(c_this==0){
		return 0;
	}
	c_this+=n;
	return c_this;
}

dtNavMesh * nav_dtAllocNavMesh(){
	dtNavMesh * c_out = dtAllocNavMesh();
	dtNavMesh * wrap_out  = (dtNavMesh *)(void*)(c_out);
	return wrap_out;
}

void nav_dtFreeNavMesh(dtNavMesh * navmesh){
	dtNavMesh * c_arg_navmesh=(dtNavMesh *)(void*)(navmesh);
	dtFreeNavMesh(c_arg_navmesh);
}

int nav_dtGetDetailTriEdgeFlags(unsigned char triFlags,int edgeIndex){
	unsigned char c_arg_triFlags=triFlags;
	int c_arg_edgeIndex=edgeIndex;
	int c_out = dtGetDetailTriEdgeFlags(c_arg_triFlags,c_arg_edgeIndex);
	int wrap_out  = (c_out);
	return wrap_out;
}

dtBVNode * nav_NewDtBVNodePtrArray(long n){
	dtBVNode* c_this=new dtBVNode[n];
	return c_this;
}

dtLink * nav_NewDtLinkPtrArray(long n){
	dtLink* c_this=new dtLink[n];
	return c_this;
}

dtMeshHeader * nav_NewDtMeshHeaderPtrArray(long n){
	dtMeshHeader* c_this=new dtMeshHeader[n];
	return c_this;
}

dtNavMeshParams * nav_NewDtNavMeshParamsPtrArray(long n){
	dtNavMeshParams* c_this=new dtNavMeshParams[n];
	return c_this;
}

dtNavMesh * nav_NewDtNavMeshPtrArray(long n){
	dtNavMesh* c_this=new dtNavMesh[n];
	return c_this;
}

dtOffMeshConnection * nav_NewDtOffMeshConnectionPtrArray(long n){
	dtOffMeshConnection* c_this=new dtOffMeshConnection[n];
	return c_this;
}

dtPolyDetail * nav_NewDtPolyDetailPtrArray(long n){
	dtPolyDetail* c_this=new dtPolyDetail[n];
	return c_this;
}

dtPoly * nav_NewDtPolyPtrArray(long n){
	dtPoly* c_this=new dtPoly[n];
	return c_this;
}

#ifdef __cplusplus
}
#endif
